package com.exampl.springstack.common.exceptionUtils.enums;

/**
 * @author Qiangfanghao
 * 异常错误码
 */
public enum ResultEnum {

    /**
     * http status: http状态码
     * code: 自定义状态码
     * 返回消息
     * Invalid parameter
     */

    OK(2000,"执行成功!"),

    INVALID_NOTIFY_PARAM(4004, "必传参数值存在空!"),
    DATA_ERROR_PARAM(5000, "数据异常!"),
    DATA_TRANSFER_ERROR(5000, "数据转换异常！"),
    USER_LOGIN_TIMEOUT(4003, "用户登录认证失败！");


    private int code;
    private String message;
    private int httpStatus;


    /**
     * http 状态码 固定为 200
     * @param code
     * @param message
     */
    ResultEnum(int code, String message) {
        this.httpStatus = 200;
        this.code = code;
        this.message = message;
    }


    public int getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }

    public int getHttpStatus() {
        return httpStatus;
    }
}
